Add ambient GPU VFX system (spores, dust, embers, resin drips, glow pulses, market ambience) and scene/renderer integration - #15
Merged
ercmine merged 1 commit intoApr 6, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
engine/render/vfx.hpp/.cppthat exposes typedEffectDefinitiontemplates, per-instanceEffectState, deterministiccore::Randomseeding, CPU-side spawn/update simulation, and per-frame instancedFrameSubmissionoutputs. (new files:engine/render/vfx.hpp,engine/render/vfx.cpp).ParticleStyle,ResinDripStyle,GlowPulseStyle) and sensible defaults viamake_*_definitionhelpers. (VFX behavior invfx.cpp).Renderer::submit_instanced) to draw quad sprites; CPU sim handles spawn/lifetime/drift and uploads instance transforms as packed 4x4 matrices per instance. (integration hooks invfx.cppand shell submission inengine/shell/main.cpp).scene::VfxAttachmentComponentpluscollect_visible_vfx_attachmentsso effects can attach to scene nodes and follow transforms; scene APIs to set/clear vfx attachments were added. (changes inengine/scene/scene.hpp/.cpp).vfx/ambient_spriteshader family and manifest variants for spores/dust/embers/resin/glow; VFX programs are loaded viaShaderProgramLibraryand used by VFX submissions. (shaders/vfx/*,shaders/shaders.cmake).RendererDebugCountersand overlay text to report VFX active effects, particles, draw counts and instance upload counts; added avfx-ambient-passtiming row in the shell. (changes inengine/render/debug_renderer.*andengine/shell/main.cpp).docs/vfx.mdand updateddocs/rendering.mdandengine/render/README.mddescribing architecture, CPU vs GPU responsibilities, pass placement, and current limits; added deterministic unit smoke tests and scene attachment assertions (tests/render/vfx_system_tests.cpp, updatedtests/scene/scene_tests.cpp).Testing
git diff --check(no whitespace errors) — succeeded.cmake --preset linux-debugand-DRENDER_ALLOW_FETCHCONTENT=ON; configuration failed due to missing external dependencies (SDL3/bgfx) and blocked network fetch (CONNECT tunnel failed, response 403) in this environment, so compiled unit tests were not executed here — failed for environmental reasons.render_vfx_system_tests, updatedscene_tests), and wired them into CMake test targets; these tests are deterministic and should run in CI when dependencies/build succeed.Codex Task